package com.zbkj.crmeb.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * 外部订单来源
 * @Description:
 * @author daigb
 * @date 2021-02-01
 */
public enum OutOrderSourceEnum implements IEnum<Integer> {
    /**
     * 天猫
     */
    JKY(1, "吉客云"),
    HAIDAI(2, "海带网"),
    TMALL(3, "天猫"),
    IM(4, "IM");

    private Integer code;
    private String msg;

    public static OutOrderSourceEnum valueOf(Integer code) {
        for (OutOrderSourceEnum value : values()) {
            if (value.getCode() == code) {
                return value;
            }
        }

        return null;
    }

    OutOrderSourceEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    @Override
    @JsonValue
    public Integer getValue() {
        return code;
    }

}
